package cn.tedu.egmybatis6.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;


@Data
public class UserArticleDTO {
    @NotBlank(message = "标题不能为空白")
    @Size(min = 1, max = 20, message = "标题长度应在1到20")
    @ApiModelProperty(value = "文章标题", required = true)
    private String title;

    @Size(min = 10, max = 500,message = "文章内容长度应为10到500")
    @NotBlank(message = "内容不能为空白")
    @ApiModelProperty(value = "文章内容", required = true)
    private String content;
}
